const WXAPI = require('apifm-wxapi')
Page({
  data: {
    footer_img: wx.getStorageSync('footer_img'),
    brand_img1: wx.getStorageSync('brand_img1'),
    brand_video1: wx.getStorageSync('brand_video1'),
    sphid: wx.getStorageSync('sphid'),
  },
  onLoad: function (options) {
    const that = this;
    that.setData({
      footer_img: wx.getStorageSync('footer_img'),
      brand_img1: wx.getStorageSync('brand_img1'),
      brand_video1: wx.getStorageSync('brand_video1'),
      sphid: wx.getStorageSync('sphid'),
    });
  },
  onShow: function () {

  },



    // 点击图片放大
    imgYu:function(event){
      var src = event.currentTarget.dataset.src;//获取data-src
      var imgList = this.data.gdtps;//获取data-list
      console.log(imgList);
      //图片预览
      wx.previewImage({
          current: src, // 当前显示图片的http链接
          urls: imgList // 需要预览的图片http链接列表
      })
  },



  //拨打电话
  callPhone() {
    wx.makePhoneCall({
      phoneNumber: wx.getStorageSync('phone')
    })
  },

  // 打开视频号主页
  toVideo() {
    wx.openChannelsUserProfile({
      finderUserName: wx.getStorageSync('sphid'),
    });
  },


  onShareAppMessage() { },
  onShareTimeline() { },
})